1. Field of the Invention
The present invention relates to a file management program and a file management method, more particularly, a file management program and a file management method for overwriting a file.
2. Description of the Related Art
Conventionally, an auxiliary storage device for storing documents and images is known. In an auxiliary storage device, documents and images are stored in a form of a file. A file management device or the like for managing such a file is known.
In storing a file, if a file having the same name already exists, a message is generally displayed to confirm with a user how to deal with it, and the file is overwritten for storage when an instruction for overwriting storage is given.
Here, Japanese Laid-Open Patent Publication No. 07-319859 proposes a technique such that, in storing a document, if a file having the same name already exists, the existing file is protected by changing the name of the existing file.
Further, Japanese Laid-Open Patent Publication No. 06-301586 proposes a technique such that, in deleting a file, the file is moved to a buffer by changing the extension of the file name.
Japanese Laid-Open Patent Publication No. 2002-312209 discloses that an image file is compressed for storage so as to prevent cut-off of the linkage to an image whose term of storage has expired.
If a device is constructed so that, in storing a file, when a file having the same name already exists, a message is displayed to confirm with the user how to deal with it, the following problem is raised. In copying a large amount of files for back-up use or the like, if a file having the same name exists in the copy destination, a message is displayed to confirm with the user how to deal with it, thereby interrupting the copying work.
On the other hand, if all the files are overwritten, the files that must be originally preserved may be lost by erroneous overwriting.
In the above-described technique of Japanese Laid-Open Patent Publication No. 07-319859, the number of files with a changed name (temporarily stored document) is limited to one, so that the temporarily stored document is rewritten every time a file is overwritten for storage. For this reason, in overwriting a plurality of files for storage, only the file that was last overwritten for storage is protected, so that the effect of back-up is small.